from loguru import logger
from setting.config import logs_file


def get_logger(file):
    # 添加到日志文件中
    logger.add(sink=file, encoding="utf=8",
               # level="ERROR",
               # rotation="100 MB"
                )
    return logger

my_log = get_logger(logs_file)
